/*++++++++++ ethernet_t ++++++++++*/
header_type ethernet_t {
    fields {
        dstAddr : 48;
        srcAddr : 48;
        etherType : 16;
    }
}
header ethernet_t ethernet;

/*---------- vlan_tag_h ----------*/
header_type vlan_tag_h {
  fields {
  pri     : 3;
  cfi     : 1;
  vlan_id : 12;
  etherType : 16;
  }
}
header vlan_tag_h vlan_tag;

/*++++++++++ ipv4_t ++++++++++*/
header_type ipv4_t {
    fields {
        version : 4;
        ihl : 4;
        diffserv : 8;
        totalLen : 16;
        identification : 16;
        flags : 3;
        fragOffset : 13;
        ttl : 8;
        proto : 8;
        hdrChecksum : 16;
        srcip : 32;
        dstip: 32;
    }
}
header ipv4_t ipv4;

/*++++++++++ tcp_t ++++++++++*/
header_type tcp_t {
    fields {
        srcport : 16;
        dstport : 16;
        seqNo: 32;
        ackNo: 32;
        dataOffset: 4;
        res: 4;
        flags: 8;
        window: 16;
        checksum: 16;
        urgentPtr: 16;
    }
}
header tcp_t tcp;

/*++++++++++ udp_t ++++++++++*/
header_type udp_t {
    fields {
        srcport : 16;
        dstport : 16;
        hdr_length : 16;
        checksum : 16;
    }
}
header udp_t udp;
